<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- xmlns="http://www.w3.org/1999/xhtml" //-->
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        <title>Check Waar Het Kind is En Was</title>
        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAcacwK_HhA1svhuu_wqn_GhTeRzDHCizjcVpqM7umADIy-0lhHxQFDDtvVxNcUCTezmlWK-Q5NZLUAw&sensor=false"
        type="text/javascript"></script>
        <?php
        include "db.php";
        $db = mysql_connect($dbhost,$dbname,$dbpass);
        mysql_select_db($dbselect);
        $sql="SELECT * FROM `parcdroid_kids` WHERE `Kind_id` = '$_GET[kind_id]' ORDER BY `Log_id` DESC";
        $result = mysql_query($sql);
        $num_rows = mysql_num_rows($result);
        if ($num_rows == 0) {
            echo "Kind_id Niet Gevonden !!<br>Controleer of u wel het juiste nummer hebt ingevuld !<br><a href=\"index.php\">Terug</a><br>";
        } else {
            $count = 0;
            while ($rij = mysql_fetch_array($result)) {
                if ($count==0) {
                    $deDingesStr = "<script type=\"text/javascript\">\n\nfunction initialize() {\n";
                    $deDingesStr .= "if (GBrowserIsCompatible()) {\n";
                    $deDingesStr .= "var map = new GMap2(document.getElementById(\"map_canvas\"));\n";
                    $deDingesStr .= "map.setMapType(G_HYBRID_MAP);\n";
                    $deDingesStr .= "map.setCenter(new GLatLng($rij[Latitude], $rij[Longitude]), 13);\n";
                    $deDingesStr .=  "map.addControl(new GSmallMapControl());\n";
                    $deDingesStr .= "map.addControl(new GMapTypeControl());\n\n";
                    $deDingesStr .= "var tinyIcon = new GIcon();\n";
                    $deDingesStr .= "tinyIcon.image = \"http://frankkie.nl/parcdroid/mm_20_red.png\";\n";
                    $deDingesStr .= "tinyIcon.shadow = \"http://frankkie.nl/parcdroid/mm_20_shadow.png\";\n";
                    $deDingesStr .= "tinyIcon.iconSize = new GSize(12, 20);\n";
                    $deDingesStr .= "tinyIcon.shadowSize = new GSize(22, 20);\n";
                    $deDingesStr .= "tinyIcon.iconAnchor = new GPoint(6, 20);\n";
                    $deDingesStr .= "tinyIcon.infoWindowAnchor = new GPoint(5, 1);\n";
                    $deDingesStr .= "\n";
                    $deDingesStr .= "markerOptions = { icon:tinyIcon };\n";

                    //$deDingesStr .= "map.setUIToDefault();\n\n\n";
                    echo $deDingesStr;
                }
                echo "map.addOverlay(new GMarker(new GLatLng($rij[Latitude],$rij[Longitude]),markerOptions));\n";

                $count++;
            }
            echo "\n}\n}\n\n</script>\n";
        }

        function doe_datum($rij) {
            return "$rij[DatumDag]-$rij[DatumMaand]-$rij[DatumJaar] $rij[TijdUur]:$rij[TijdMinuut]:$rij[TijdSeconde]";
        }
        ?>
    </head>
    <body onload="initialize()" onunload="GUnload()">
        <div id="map_canvas" style="width: 800px; height: 600px"></div>

    </body>
</html>